//
//  Fraction.h
//  02_ClassAndObject
//
//  Created by 徐昊 on 16/7/5.
//  Copyright © 2016年 徐昊. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface Fraction : NSObject

@property (nonatomic, assign)NSInteger numerator;

@property (nonatomic, assign)NSInteger denominator;

- (instancetype)initWithNumerator:(NSInteger)numerator
                      denominator:(NSInteger)denominator;

+ (instancetype)frationWithNumerator:(NSInteger)numerator denominator:(NSInteger)denominator;

- (Fraction *)plusWithFraction:(Fraction*)fraction;

- (Fraction *)minusWithFraction:(Fraction *)fraction;

- (Fraction *)multiplyWithFraction:(Fraction *)fraction;

- (Fraction *)divideWtihFraction:(Fraction *)fraction;

// 比较大小
- (void)compareWithFraction:(Fraction *)fraction;

// 约分
- (Fraction *)reduce;


@end
